package mk.com.ldm.corepoint.administration.shared;

import java.util.ArrayList;

@SuppressWarnings("serial")
public class PermissionsObject extends SimpleObject {
	
	private String viewName;
	private String permissionType;
	private ArrayList<String> values;
	
	public PermissionsObject(){
		
	}
	
	public PermissionsObject(String viewName, String permissionType,
			ArrayList<String> values) {
		super();
		this.viewName = viewName;
		this.permissionType = permissionType;
		this.values = values;
	}

	public String getViewName() {
		return viewName;
	}

	public void setViewName(String viewName) {
		this.viewName = viewName;
	}

	public String getPermissionType() {
		return permissionType;
	}

	public void setPermissionType(String permissionType) {
		this.permissionType = permissionType;
	}

	public ArrayList<String> getValues() {
		return values;
	}

	public void setValues(ArrayList<String> values) {
		this.values = values;
	}
	
	public boolean getAll(){
		if(values.get(0).equals("*all*"))
			return true;
		else
			return false;
	}
	
	public void setAll(){
		ArrayList<String> permissions = new ArrayList<String>();
		permissions.add("*all*");
		this.values = permissions;
	}
	
}
